#include<stdio.h>
int main()
{
    int n,f=0;
    scanf ("%d",&n);
    while (n!=0)
    {
        f*=10;
        f+=n%10;
        n/=10;
    }
    printf("%d",f);
    return 0;
}
